<template>
  <view class="wrapper">
    <scroll-view :style="'height:' + windowHeight + 'px'" class="content" scroll-y>
      <view class="name">
        {{obligationObj.brigadeName}}
      </view>
      <view class="title">
        权利义务告知书
      </view>
      <view v-html="obligationObj.dutyContent" class="txt"></view>
    </scroll-view>
    <view @click="submit" class="center u-btn">
      签字确认
    </view>
  </view>
</template>

<script>
  export default {
    props: {
      transcriptList: {
        type: Object,
        default: () => {}
      },
      obligationObj: {
        type: Object,
        default: () => {}
      }
    },
    data() {
      return {
        windowHeight: 0
      }
    },
    mounted() {
      uni.getSystemInfo({
        success: (res) => {
          this.windowHeight = res.windowHeight - 78
        }
      });
    },
    methods: {
      submit() {
        this.$emit('submit')
      }
    }
  }
</script>

<style scoped lang="scss">
  .wrapper {
    padding: 20rpx 24rpx 33rpx 24rpx;
    box-sizing: border-box;
    background-color: #F8F9FE;

    .name {
      font-size: 24rpx;
      font-family: PingFangSC-Regular, PingFang SC;
      color: #999999;
      line-height: 30rpx;
      text-align: center;
      margin-top: 45rpx;
    }

    .title {
      text-align: center;
      margin-top: 6rpx;
      font-size: 36rpx;
      font-family: PingFangSC-Semibold, PingFang SC;
      font-weight: 600;
      color: #333333;
      line-height: 56rpx;
      margin-bottom: 24rpx;
    }

    .content {
      background-color: #FFFFFF;
      border-radius: 2rpx;

      .txt {
        padding: 0 18rpx;
        font-size: 26rpx;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #666666;
        line-height: 42rpx;
      }
    }

    .u-btn {
      height: 80rpx;
      background: #3961FA;
      border-radius: 4rpx;
      margin-top: 24rpx;
      color: #FFFFFF;
    }
  }
</style>
<style>
  page {
    background-color: #F8F9FE;
  }

  scroll-view ::-webkit-scrollbar {
    width: 0;
    height: 0;
    color: transparent;
    display: none;
  }
</style>
